package com.hyjx.framework.service.model;

import com.hyjx.framework.uc.depart.DepartModel;
import com.hyjx.framework.uc.menu.MenuModel;
import com.hyjx.framework.uc.user.UserModel;
import com.hyjx.framework.uc.user.UserRoleModel;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 缓存用户、用户对应菜单
 *
 * @author Peter
 */
@SuppressWarnings("serial")
public class CacheUser implements Serializable {
    private String userId;
    private UserModel user;
    private Map<String, UserRoleModel> userroles;

    private String rightOrgs;        //当前用户对应的单位列表
    private List<DepartModel> rightOrgList;    //当前用户对应的单位列表
    private String rightMenus;        //当前用户对应的菜单列表
    private Map<String, List<MenuModel>> rightMenuMap;    //当前用户对应的菜单列表，List中只包括一级菜单、children包括非一级菜单

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public UserModel getUser() {
        return user;
    }

    public void setUser(UserModel user) {
        this.user = user;
    }

    public Map<String, UserRoleModel> getUserroles() {
        return userroles;
    }

    public void setUserroles(Map<String, UserRoleModel> userroles) {
        this.userroles = userroles;
    }

    public CacheUser(String userId, UserModel user, Map<String, UserRoleModel> userroles) {
        super();
        this.userId = userId;
        this.user = user;
        this.userroles = userroles;
    }

    public String getRightOrgs() {
        return rightOrgs;
    }

    public void setRightOrgs(String rightOrgs) {
        this.rightOrgs = rightOrgs;
    }

    public List<DepartModel> getRightOrgList() {
        return rightOrgList;
    }

    public void setRightOrgList(List<DepartModel> rightOrgList) {
        this.rightOrgList = rightOrgList;
    }

    public String getRightMenus() {
        return rightMenus;
    }

    public void setRightMenus(String rightMenus) {
        this.rightMenus = rightMenus;
    }

    public Map<String, List<MenuModel>> getRightMenuMap() {
        return rightMenuMap;
    }

    public void setRightMenuMap(Map<String, List<MenuModel>> rightMenuMap) {
        this.rightMenuMap = rightMenuMap;
    }

}